<template>
  <div :style="[outModuleCss]">
    <div class="walletBox"  v-if="propsData.params.gridNum==3">
      <div :style="[moduleBgCss]" class="module-bg" ></div>
      <div class="walletContent">
        <div class="title">
          <moduleHeader
            :propsData="propsData"
            :moreText="propsData.params.moreText"
            :moduleName="propsData.params.text"
            @editModuleHeader="editModuleHeader"
          ></moduleHeader>
          
        </div>
      </div>
    </div>

    <div class="walletBox"  v-if="propsData.params.gridNum==2">
      <div :style="[moduleBgCss]" class="module-bg" ></div>
      <div class="walletContent">
        <div class="title">
          <moduleHeader
            :propsData="propsData"
            :moreText="propsData.params.moreText"
            :moduleName="propsData.params.text"
            @editModuleHeader="editModuleHeader"
          ></moduleHeader>
          <div style="width: 88%;" class="xiand" v-if=" propsData.params.newData==1" :style="[xianCss]">——</div>
          
        </div>
        <div style="margin-top: 10rpx;  width:88%" :style="[propsData.params.css]" v-if="propsData.params.useTitle1 == 1" > 
            {{ propsData.params.nextText }}
          </div>
      </div>
    </div>

    <div class="walletBox"  v-if="propsData.params.gridNum==1">
      <div :style="[moduleBgCss]" class="module-bg" ></div>
      <div class="walletContent">
        <div class="title">
          <moduleHeader
            :propsData="propsData"
            :moreText="propsData.params.moreText"
            :moduleName="propsData.params.text"
            @editModuleHeader="editModuleHeader"
          ></moduleHeader>
          
        </div>
        <div style="margin-top:10rpx;  width:88%" :style="[propsData.params.css]" v-if="propsData.params.useTitle1 == 1" > 
            {{ propsData.params.nextText }}
          </div>
      </div>
    </div>
  </div>
</template>

<script>
import { diySysPageMixin } from "../../mixins/index";
import moduleHeader from "./components/index.vue";
export default {
  name: "userTools",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
  },
  mixins: [diySysPageMixin],
  components: {
    moduleHeader,
  },
  data() {
    return {};
  },
  computed: {
    xianCss(){
      return this.propsData.params.xian || "";
    }
  },
  methods: {
    editModuleHeader(e) {
      this.$emit("chooseMoudle", e);
    },
    chooseItem(e) {
      this.$emit("chooseMoudle", e);
    },
  },
};
</script>

<style lang="scss" scoped>
.xiand{
  font-size: 30rpx;
  text-align: center;
  line-height: 10rpx;
  font-weight: 900;
}
.walletBox {
  width: 100%;
  position: relative;
  .module-bg {
    width: 100%;
    height: 100%;
    z-index: -1;
    position: absolute;
    left: 0;
    top: 0;
  }
  .walletContent {
    width: 100%;
    padding: 24rpx 12rpx 24rpx 24rpx;
    .walletList {
      display: flex;
      align-items: center;
      padding: 16rpx 16rpx 0 16rpx;
      justify-content: space-between;
      .walletItem {
        display: flex;
        flex-direction: column;
        position: relative;
        align-items: center;
        .count {
          display: flex;
          align-items: baseline;
          font-size: 38rpx;
          font-weight: 600;
          font-family: PingFang SC;
          margin-bottom: 10rpx;
          span:nth-child(2) {
            font-size: 18rpx;
            font-weight: 400;
          }
        }
        .name {
          font-size: 24rpx;
          font-family: PingFang SC;
        }
        .sub {
          font-size: 20rpx;
        }
      }
      .walletItem:hover::before {
        cursor: pointer;
        content: "\e657";
        font-family: "iconfont";
        position: absolute;
        right: 0;
        top: 0;
        width: 40rpx;
        height: 40rpx;
        background-color: #1890fc;
        border-radius: 0 0 0 8rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28rpx;
        color: #fff;
      }
      .walletItem:hover::after {
        cursor: pointer;
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        border: 2rpx solid #1890fc;
      }
    }
  }
}
</style>